package com.markus.code.图.图2;

/**
 * Author:markusZhang
 * Date:Create in 2020/8/30 15:39
 * todo:
 */
public class GraphClient {
    public static void main(String[] args) {
//        int [][] flights = {{100,1,2},{100,2,3},{500,3,4},{500,1,3},{500,2,4}};
        int [][] flights = {{100,1,2},{100,1,3},{500,1,4},{500,2,5},{500,3,4}};
        Graph graph = GraphGenerator.generator(flights);
        System.out.println("深度优先遍历");
        GraphDfs dfs = new GraphDfs();
        dfs.dfs(graph.nodes.get(1));
        System.out.println();
        System.out.println("广度优先遍历");
        GraphBfs bfs = new GraphBfs();
        bfs.bfs(graph.nodes.get(1));
    }
}
